package com.yboot.framework.plugin.generator.entity;

/**
 * 列信息
 *
 * @author .
 * @date 2022-11-10
 */
public class GenTableColumn {

    public final static String COLUMN_KEY_PRI = "PRI";

    // 原本的列信息

    /**
     * 列名
     */
    private String columnName;
    /**
     * 列注释
     */
    private String columnComment;
    /**
     * 列类型 - 数据库类型
     */
    private String columnType;
    /**
     * 键类型 - pri、uni等
     */
    private String columnKey;
    /**
     * 是否必填 - YES、NO
     */
    private String required;

    // 扩展了下字段

    /**
     * 对应的Java类型
     */
    private String javaType;
    /**
     * 对应的Java属性
     */
    private String javaField;
    /**
     * 校验器名称
     */
    private String validatorName;

    /**
     * 标记列是否可以搜索
     */
    private boolean searchable;

    public String getColumnName() {
        return columnName;
    }

    public void setColumnName(String columnName) {
        this.columnName = columnName;
    }

    public String getColumnComment() {
        return columnComment;
    }

    public void setColumnComment(String columnComment) {
        this.columnComment = columnComment;
    }

    public String getColumnType() {
        return columnType;
    }

    public void setColumnType(String columnType) {
        this.columnType = columnType;
    }

    public String getColumnKey() {
        return columnKey;
    }

    public void setColumnKey(String columnKey) {
        this.columnKey = columnKey;
    }

    public String getRequired() {
        return required;
    }

    public void setRequired(String required) {
        this.required = required;
    }

    public String getJavaType() {
        return javaType;
    }

    public void setJavaType(String javaType) {
        this.javaType = javaType;
    }

    public String getJavaField() {
        return javaField;
    }

    public void setJavaField(String javaField) {
        this.javaField = javaField;
    }

    public String getValidatorName() {
        return validatorName;
    }

    public void setValidatorName(String validatorName) {
        this.validatorName = validatorName;
    }

    public boolean isSearchable() {
        return searchable;
    }

    public void setSearchable(boolean searchable) {
        this.searchable = searchable;
    }
}
